home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1988 March
/
1988-03.d64
/
ml cloner
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
38 lines
10 rem copyright 1988 compute! publications inc. - all rights reserved
20 ifpeek(65530)=5then(NULL)15:cp=128
30 ea=174:sa=193:ifpeek(65530)=164thencp=16:ea=157:sa=178
40 b=16:z=256:printchr$(14)"[147][144] [195]opyright 1988 [195][207][205][208][213][212][197]! [208]ub., [201]nc."
50 printtab(11)"[193]ll [210]ights [210]eserved"
60 print"";:fori=1to40:printchr$(32);:next:printspc(15)"[145][205]l [195]loner"
70 input"filename";n$:ifn$=""thenprint"[147]":end
80 gosub350:ifa=62thenprint"filename not found on this disk.":n$="":goto70
90 ifathenprint"error: "b$:end
100 print"loading "n$;:ifcp=128then(NULL)(n$),b0:goto130
110 poke147,0:ifcp=16thensys43115n$,8,1:sys61516:goto130
120 sys57812n$,8,1:sys62631
130 print". completed."
140 l=asc(a$+chr$(0)):h=asc(b$+chr$(0)):s=l+z*h:e=peek(ea)+z*peek(ea+1)-1
150 printspc(18)"hex dec":d=s:gosub330:d=e:hs$=h$:h$="":gosub330
160 print"starting address: "hs$tab(23)s
170 print"ending address: "h$tab(23)e
180 print"ready to copy this file now (y/n)?";:gosub310:ifk$<>"y"then290
190 print"want to change the filename (y/n)?";:gosub310
200 ifk$="y"thenprint"old filename: "n$:input"new filename";n$
210 print"press <return> for your copy."
220 getk$:ifk$<>chr$(13)then220
230 gosub350:ifa>0anda<>62thenprint"error: "b$:goto180
240 ifa=0thenprint"filename: "n$:print"exists on this disk.":goto180
250 print"copying "n$;:ifcp=128then(NULL)(n$),b0,p(s)top(e+1):goto280
260 ifcp=16thensys43115n$,8,1:pokesa,l:pokesa+1,h:sys61860:goto280
270 sys57812n$,8,1:pokesa,l:pokesa+1,h:sys62957
280 print". completed.":print"copy it again (y/n)?";:gosub310:ifk$="y"then190
290 print"want to run this program again (y/n)?";:gosub310:ifk$="y"thenrun
300 end
310 getk$:ifk$<>"y"andk$<>"n"then310
320 print""k$:return
330 x=((d/b)-int(d/b))*b:h$=chr$(7*abs(x>9)+x+48)+h$:d=(d-x)/b:ifdthen330
340 return
350 open15,8,15,"i0:":open8,8,8,"0:"+n$+",p,r"
360 input#15,a,b$:ifa=0ands=ethenget#8,a$,b$
370 close8:close15:return